home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gigarom 1
/
Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso
/
FILES
/
EXT
/
P-T
/
ShutDowner.sit
/
ShutDowner
/
ShutDowner.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-03-15
|
561b
|
34 lines
#include <ShutDown.h>
#include <Events.h>
extern void SHOWINIT();
#define IconID 128
#define ShutDownkey 0x77 /* 'end' key */
/*
shift - 0x38
control - 0x3B
esc - 0x35
*/
void
main(void)
{
long key[4];
unsigned char *theKeys;
GetKeys(key);
theKeys = (unsigned char *)(key);
if ((theKeys[((unsigned short)(ShutDownkey)) >> 3] >> (((unsigned short)(ShutDownkey)) & 7)) & 1)
ShutDwnPower();
asm /* show init */
{
move.w #IconID,-(sp) ; load ICN# ID
move.w #-1,-(sp) ; use default moveX
bsr SHOWINIT ; draw the icon
}
}